From: Florian Müllner Date: Tue, 7 Jul 2020 11:06:29 +0000 (+0200) Subject: workspacesView: Only animate primary view X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~152 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52a7481ba623937181327bd3a908e5e95b566efa;p=gnome-shell.git workspacesView: Only animate primary view Non-primary views always use their monitor's work area for their geometry, so there's nothing to animate when leaving the overview. The animation is already limited to the primary view when entering the overview, so this is also more consistent. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1353 --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index af767a434..ea5156836 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -569,14 +569,6 @@ class WorkspacesDisplay extends St.Widget { animateFromOverview(fadeOnPrimary) { for (let i = 0; i < this._workspacesViews.length; i++) { - const { x, y, width, height } = - Main.layoutManager.getWorkAreaForMonitor(i); - this._workspacesViews[i].ease({ - x, y, width, height, - duration: ANIMATION_TIME, - mode: Clutter.AnimationMode.EASE_OUT_QUAD, - }); - let animationType; if (fadeOnPrimary && i == this._primaryIndex) animationType = AnimationType.FADE; @@ -584,6 +576,15 @@ class WorkspacesDisplay extends St.Widget { animationType = AnimationType.ZOOM; this._workspacesViews[i].animateFromOverview(animationType); } + + const { primaryIndex } = Main.layoutManager; + const { x, y, width, height } = + Main.layoutManager.getWorkAreaForMonitor(primaryIndex); + this._getPrimaryView().ease({ + x, y, width, height, + duration: ANIMATION_TIME, + mode: Clutter.AnimationMode.EASE_OUT_QUAD, + }); } vfunc_hide() {